<script setup>
import { defineAsyncComponent } from 'vue'
import router from '@/router'
import { useApp } from '@/pinia/modules/app'
// import * as dd from 'dingtalk-jsapi' // 此方式为整体加载，也可按需进行加载
const homeView = defineAsyncComponent(() => import('@/components/homeView.vue'))
const { authorization } = useApp()
// console.log('home')
if (!authorization) {
  console.log('调转登录')
  router.push(`/login`)
}
// if (dd.env.platform !== "notInDingTalk") {
//   dd.ready(() => {
//     dd.device.screen.rotateView({
//     showStatusBar : true, // 否显示statusbar
//     clockwise : true, // 是否顺时针方向
//     onSuccess : function(result) {
//       console.log(result)
//     },
//     onFail : function(err) {
//       console.log(err)
//     }
//   })
//   })
// }
</script>

<template>
  <main>
    <Suspense>
      <template #default>
        <home-view></home-view>
      </template>
    </Suspense>
  </main>
</template>
